Method and system for generating schema to java mapping descriptors

ABSTRACT

A method and system for generating schema to Java descriptors. In one embodiment, a second object having customized schema to Java mapping information is created. The second object is placed within a first object. Via the first object, schema to Java generation is initiated.

TECHNICAL FIELD

Embodiments of the invention generally relate to the field of webservices and, more particularly, to generating schema to Java mappingdescriptors using schema to Java generation architecture.

BACKGROUND

Efforts are being made to more easily conduct business in a web-basedenvironment. “Web Services” is loosely understood to mean the ability todiscover and conduct business in a web-based environment. For example, auser (e.g., a web-based application or person with a web browser)may: 1) search through an online registry of businesses and/or services;2) find a listing in the registry for web based access to a service thatthat the user desires to have performed; and then, 3) engage in a webbased business relationship with the service application including thepassing of relevant information (e.g., pricing, terms, and conditions)over the network. In other words, web services generally refer toofferings of services by one application to another via the World WideWeb.

Given the nature and use of web services and the rapid increase in theirdemand, interoperability of web services across clients and servers isbecoming increasingly important and cumbersome. Some attempts have beenmade to achieve interoperability across a wide range of platforms andruntimes. For example, using open standards like extensible MarkupLanguage (XML), Simple Object Access Protocol (SOAP), Web ServicesDescription Language (WSDL), and Universal Description, Discovery, andIntegration (UDDI), some interoperability has been achieved.

FIG. 1 illustrates a prior art web services platform 100. The platform100 shows various XML-related standards 102-110 that are used inconnection with web services to attempt interoperability. Theillustrated standards include XML Namespaces 102, similar to Javapackage names, to provide syntax for data representation in portableformat. SOAP 104 refers to a standard packaging format for transmittingXML data between applications over a network. XML schema 106 refers tothe World Wide Web Consortium (W3C) schema specification for XMLdocuments. WSDL 108 refers to the standard used for describing thestructure of XML data that is exchanged between systems using SOAP 104.Finally, UDDI 110 refers to a standard SOAP-based interface for webservices registry and defines a set of web services operations andmethods that are used to store and search information regarding webservices applications.

However, the open standards are not evolving fast enough to keep up withthe increasing demand for web services and needs of additionalflexibility and control on the client-side. One of the problems today isthe convoluted relationships and mappings between relevant standards.Neither the interoperability nor the client-side flexibility aresufficiently achieved because of the conventional separation ofstandards, models, and entities for web services (WS) and web servicesclient (WSC). FIG. 2 illustrates a prior art web services model 200. Theillustrated web services model 200 includes Web service definition 204,which includes the description of design-time configuration of a webservice. Web service configurations 206 refer to the description of therun-time configurations of a web service. The web services model 200further includes a virtual interface 202. A virtual interface 202 refersto an abstract interface.

Referring now to FIG. 3, it illustrates a prior art web services clientmodel 300. In the illustrated web services client model 300, schema toJava (STJ) mappings 302 contain serializer classes and deserializerclasses of the XML Schema Definition (XSD) Types. However, theconventional STJ mappings 302 do not contain any field oroperation-specific mappings. The conventional model 300 further includeslogical ports 304 that are limited to containing merely runtime (RT)relevant configurations and do not contain design-time (DT)configurations. Finally, the illustrated WSDL 306 contains a parsed WSDLstructure.

Although the conventional models 200, 300 provide some flexibility,further improvements are needed to achieve interoperability. Forexample, the conventional model 200 provides provider-orientedinside-out approach for web services, but it does not supportconsumer-based outside-in approach for web services, which is becomingincreasingly important. The conventional models 200, 300 do not providesimilar modeling approach for developing web services and web servicesclient which leads to usability deficiencies.

SUMMARY

A method and system are provided for generating schema to Javadescriptors using schema to Java generation architecture. In oneembodiment, a second object having customized schema to Java mappinginformation is created. The second object is placed within a firstobject. Via the first object, schema to Java generation is initiated.The first object further includes default customized schema to Javamapping information.

BRIEF DESCRIPTION OF THE DRAWINGS

The appended claims set forth the features of the invention withparticularity. The embodiments of the invention, together with itsadvantages, may be best understood from the following detaileddescription taken in conjunction with the accompanying drawings inwhich:

FIG. 1 illustrates a prior art web services platform;

FIG. 2 illustrates a prior art web services model;

FIG. 3 illustrates a prior art web services client model;

FIG. 4 illustrates an embodiment of a common meta model for web servicesand web services client;

FIG. 5 illustrates an XML binding framework;

FIG. 6A illustrates an embodiment of an XML data binding framework;

FIG. 6B illustrates an embodiment of configuration data;

FIG. 6C illustrates an embodiment of a schema to Java configurationobject;

FIG. 7 illustrates architecture for schema to Java generation;

FIG. 8 illustrates an embodiment of a schema to Java generationmechanism;

FIG. 9 illustrates an embodiment of a schema to Java generationmechanism;

FIG. 10 illustrates an embodiment of a configuration structure;

FIG. 11 illustrates a process for an embodiment of schema to Javageneration;

FIG. 12 illustrates an exemplary client/server system used forimplementing an embodiment of the invention; and

FIG. 13 is an exemplary computer system used in implementing anembodiment of the invention.

DETAILED DESCRIPTION

Described below is a system and method for generating schema to Javamapping descriptors using schema to Java generation architecture.Throughout the description, for the purposes of explanation, numerousspecific details are set forth in order to provide a thoroughunderstanding of the embodiments of the present invention. It will beapparent, however, to one skilled in the art that the present inventionmay be practiced without some of these specific details. In otherinstances, well-known structures and devices are shown in block diagramform to avoid obscuring the underlying principles of the presentinvention.

In the following description, numerous specific details such as logicimplementations, opcodes, resource partitioning, resource sharing, andresource duplication implementations, types and interrelationships ofsystem components, and logic partitioning/integration choices may be setforth in order to provide a more thorough understanding of variousembodiments of the present invention. It will be appreciated, however,to one skilled in the art that the embodiments of the present inventionmay be practiced without such specific details, based on the disclosureprovided. In other instances, control structures, gate level circuitsand full software instruction sequences have not been shown in detail inorder not to obscure the invention. Those of ordinary skill in the art,with the included descriptions, will be able to implement appropriatefunctionality without undue experimentation.

Various embodiments of the present invention will be described below.The various embodiments may be embodied in machine-executableinstructions, which may be used to cause a general-purpose orspecial-purpose processor or a machine or logic circuits programmed withthe instructions to perform the various embodiments. Alternatively, thevarious embodiments may be performed by a combination of hardware andsoftware.

Various embodiments of the present invention may be provided as acomputer program product, which may include a machine-readable mediumhaving stored thereon instructions, which may be used to program acomputer (or other electronic devices) to perform a process according tovarious embodiments of the present invention. The machine-readablemedium may include, but is not limited to, floppy diskette, opticaldisk, compact disk-read-only memory (CD-ROM), Digital Video Disk ROM(DVD-ROM), magneto-optical disk, read-only memory (ROM) random accessmemory (RAM), erasable programmable read-only memory (EPROM),electrically erasable programmable read-only memory (EEPROM), magneticor optical card, flash memory, or another type of media/machine-readablemedium suitable for storing electronic instructions. Moreover, variousembodiments of the present invention may also be downloaded as acomputer program product, wherein the program may be transferred from aremote computer to a requesting computer by way of data signals embodiedin a carrier wave or other propagation medium via a communication link(e.g., a modem or network connection).

FIG. 4 illustrates an embodiment of a common meta model 400 for webservices and web services client. In the illustrated embodiment, acommon web services meta model 400 is generated by combining variousmodels 402-408 into a single common model (common model) 400. Forexample, the common model 400 includes a WSDL model 402, which refers toa model for describing the WSDL structure of the web services that aredeveloped within an application, and/or WSDL files that are used togenerate WS client proxies. The WSDL model 402 may also contain WSDLrelevant extensions. The WSDL interface mappings (WSDL IM) model 404refers to a model for describing mappings between the Java ServiceEndpoint (JSE) Interface (e.g., generated proxy service interface) andits WSDL representation, such as the names of the Java method and WSDLoperation representing the method, default values of parameters, etc.

The illustrated Schema to Java mappings model 406 is used for describingmappings between XSD types and Java classes representing these types,such as the names of the fields. The configuration model 408 includesthe design-time and runtime configuration of web services and webservices client. The configuration model 408 logically references theWSDL model 402 and the WSDL IM model 404, which, in turn, references theSTJ mappings model 406.

As illustrated, in one embodiment, a common model 400 is provided for WSand WSC frameworks to perform development, deployment and configurationof applications with relative ease. WS and WSC frameworks may reside ona Java 2 Enterprise Edition (J2EE) engine. In one embodiment, the commonmodel 400 is migrated to the J2EE engine to run and use the WS/WSC proxyon the J2EE engine to provide a common model for WS and WSC frameworks.Such migration can be performed using various migration controllers andinterfaces that are used for application development. In one embodiment,the common configuration is achieved by having a common configurationentity in the configuration model 408. Common design utilities areprovided using a common interface mapping model 404 and a common schemato Java mapping model 406, while common deployment entities are providedwith insignificant differences between client and server.

In one embodiment, common models 402-408 are managed by a commonframework at the J2EE engine. The common model 400 is created by, first,identifying those elements, features, and components (components orproperties) that are common to both web services model and web servicesclient model. Once such common components are identified, they are thenextracted and put together to create a common WS model. It iscontemplated that those components that are necessary and/or preferredare used to create the common framework, while those components that arenot regarded as necessary and/or preferred may not be used. Further, theuse of such common components helps support the deployment of webservices and web services client in a common way. For example, SAPadministrative tools model can be converted in light of the commonframework to separate the WS tools in the SAP Administrative tools fromthe J2EE engine because of the different requirements associated withthe SAP Administrative tools and the J2EE engine. Examples ofadministrative tools include various Integrated Development Environment(IDE) tools (e.g., IDE wizard and IDE views) and other SAP-based IDE andadministrative tools, such as SAP NetWeaver Developer Studio, SAP VisualAdministrator, and SAP NetWeaver Administrator. Further, SAP's IDE canbe based on the Eclipse IDE and may contain additional SAP developedplugins.

In the illustrated embodiment, the common model 400 combines therequirements from both the provider and consumer scenarios and issuitable to be used by both the service and client platforms. This isperformed such that the common elements of functionality are adopted,while the uncommon elements work side-by-side not only withoutinterfering with each other, but by complementing each other in thecommon model 400. In one embodiment, common models 402-408 are generatedand employed and further, they are directly mapped in a common model 400via any number of programming languages that are right for the time(e.g., C, C++, C#, Java, and ABAP). Further, a generator, such as aproxy generator or a code generator, modules, interfaces, and componentsare employed to form common models 402-408, generate WSDL model, formdirect mapping between models 402-408 and between web servicesinterfaces and Java interfaces.

The common model 400 eliminates the need for the conventional virtualinterface for storing the data (e.g., description of the interface andits types). In one embodiment, web services interface data is separatebetween the WSDL model 402 and the two mapping models 404, 406. Usingthis technique, SOAP extensions are not longer necessary as the need forVI to WSDL conversion is eliminated. Using the common model 400, webinterfaces are described in the WSDL model 402 as opposed to a virtualinterface. Further, the interface mapping information is used todescribe the mapping of web interfaces to Java interfaces (e.g., JavaSEI). Then, multiple design time configurations can be attached to asingle interface as an alternative.

Furthermore, the web services definition, which can be used to describean alternative design-time configuration, is made part of thedesign-time part of the configuration model 408. This helps eliminatethe need for generating several portTypes based on the web servicesdefinition, which would otherwise be necessary because the configurationwould have to be expressed in the form of WSDL extensions. In oneembodiment, a WS-policy standard is used to express configuration of webservices and consequently, several alternative configurations can beexpressed using one WSDL portType. A WS-policy standard can bedynamically created in which various parameters can be defined asnecessary or desired. Further, a client proxy generated out of such WSDLmay contain a single service endpoint interface (SEI), which has asuperior use for the application developer using it as proxy. An SEI canbe used to specify methods of the Java class that are to be exposed asweb services operations, which are included and published in the WSDLmodel 402 as the portType that a client application uses to invoke webservices.

In one embodiment, the STJ mappings model 406 contains not onlyserializer and deserializer classes, but also other field andoperation-specific mappings information. Using the STJ mappings model406 having such information helps facilitate various kinds of mappings,such as names of getter/setter methods of a specific field, if anattribute is presented as a data member or with getters/setters, etc.

The illustrated WSDL model 402 includes a WSDL file that specifies theWSDL structure, including message formats, Internet protocols, andaddresses, that a client may use to communicate with a particular webservice. A WSDL document contains sections to describe web services datastructures using XML schema. A WSDL document contains various componentsand elements (e.g., biding, import, message, operation, portType,service, and types) that are rooted in the root element (e.g.,definitions element) of the WSDL document. The “types” WSDL elementcontains XML schemas inlined or references to standalone XSD documents.

The binding element is used to assign portTypes and its operationelements to a particular protocol (e.g., SOAP) and encoding style. Theimport element is used to import WSDL definitions from other WSDLdocuments (such as those similar to an XML schema document importelement). The message element describes the message's payload using XMLschema built-in types, complex types, and/or elements defined in theWSDL document's type elements. The operation and portType elementsdescribe web service's interface and define its methods and are similarto Java interfaces and their method declarations. The service element isused for assigning an Internet address to a particular binding. The typeelement uses the XML schema language to declare complex data types andelements that are used elsewhere in the WSDL document. The WSDL IM model404 is used for describing the mappings between the Java SEI and itsWSDL representation.

The STJ mappings model 406 contains a model for describing mappingsbetween XSD types and Java classes representing a group of classes andinterfaces in Java packages, a set of Java content interfacesrepresenting the content models declared within the schema, and a set ofJava element interfaces representing element declarations occurringwithin the schema.

In one embodiment, the WSDL IM model 404 contains reference to and useselements of interfaces with the WSDL model 402. The WSDL IM model 404further contains reference to the STJ mappings model 406. The STJmappings model 406, on the other hand, references to the WSDL model 402and uses elements from the WSDL model 402. Examples of the elements thatthe STJ mappings model 406 uses include elements of XSD and/or typeelements, such as complex type and simple type. The configuration model408 contains reference to the WSDL model 402 and the WSDL IM model 404.

A virtual interface refers to an abstract interface and/or a typedescription system that is created based on a programming languageinterface (e.g., Java interface and ABAP methods). A virtual interfacecan be used to decouple the language-specific implementation frominterface description. A web service refers to an interface of the webservice as described by the WSDL file at the WSDL model 402, whichdescribes web services methods and web services type systems, such asthe XML messages transmitted upon the web services invocation. When theweb service interface is generated via the virtual interface, it is doneby having Java classes build the virtual interface to generate the WSDLfile (web interface). This process of WSDL generation is carried in theengine by the WS runtime, while the virtual interface contains hints forWSDL generation details called SOAP extensions. A WSDL file providesproxy generator which generates Java classes (web services client proxy)and logical ports (that contain web services client configuration).Using the web services client proxy classes, application invoke the webservices described by the WSDL file. Also, using logical ports,applications configure the web services client proxy.

In one embodiment, virtual interfaces and the virtual interface modelare eliminated by having the web services development based on WSDL (webservices interface) at the WSDL model 402 in an outside-in scenario. Forexample, on the server side, WSDL 402 provides proxy generator whichgenerates default mappings that are then changed (e.g., updated as thedesired by the developer or as necessitated) using an administrativeand/or IDE tool, such as an IDE wizard, SAP Visual Administrator, SAPNetWeaver Developer Studio, etc. This is then used by the proxygenerator to generate Java beans with mapped Java methods and WSDL 402and mappings and the configuration model 408. A developer can implementmethods (logic) of the bean and thus, providing logic to the webservices methods. Furthermore, the conventional inside-out scenario canbe customized using administrative tools and/or IDE tools to becompatible with the new model 400. For example, in one embodiment, Javaclasses can created a virtual interface that generates default WSDLwhich proves a proxy generator which further generates default mappings.These default mappings (e.g., default Java mappings) are then changed orupdated or customized to reflect the original Java interface for whichthe common WS model 400 can be used by using/reusing the outside-indeployment. On the client side, in one embodiment, WSDL at the WSDLmodel 402 provides a proxy generate which generates Java files andmappings and the configuration model 408. This mechanism provides havingthe same deployment entities for adapting various scenarios (e.g.,inside-out and outside-in) and allows the common model 400 fordevelopment of such scenarios.

FIG. 5 illustrates an XML binding framework 500. The illustrated XMLbinding framework 500 is used to help generate classes, interfaces, andserialized. The framework 500 contains three components a generator 502,a serialization runtime 504, and a user API 506. The generator 502 isused as a tool to generate serialization framework and Java containerclasses using schema files and default mapping information.Serialization runtime 504 contains serialization frameworkimplementation and the core set of serializers that are used forbuilt-in schema types. Serialization runtime 504 serves as intermediaryto convert the objects generated by the generator 502 to theircorresponding XML fragments. An object refers to an instance of a class,which refers to a type. An XML fragment refers to an element of an XMLfile. The user API 506 contains interfaces and classes that applicationsuse to work with framework marshalling and unmarshalling utilityfunctions.

FIG. 6A illustrates an embodiment of an XML data binding framework(binding framework) 600. The illustrated binding framework 600 includesschema to a Java generation tools (generation tools) 602, serializationruntime 604, and a user API 606. Generation tools 602 include agenerator (e.g., schema to Java generator) 608, an input schema to Javaconfiguration object (configuration object) 610, and an outputconfiguration data (configuration data) 612. Schema to Java generator608 is used to generate serialization framework, Java containerfiles/classes, and the output descriptor 616 using schema (XSD) filesand the configuration object 610. Serialization runtime 604 containsserialization framework implementation and a core set of serializersthat are used for the built-in schema types. User API 612 containsinterfaces and classes that applications use to work with the bindingframework 600 for marshalling and un-marshalling utility functions, andthe user API 106 is further used as an interface to the user (e.g.,programmer and administrator).

In one embodiment, the configuration object 610 refers to an objectincluding default and customized schema to Java configuration mappinginformation. The configuration object 610 may also include defaultmapping information, as necessitated. Further, the mapping informationcontained of the configuration object 610 is changeable to update andcustomization. Using the configuration object 610 and schema files, theschema to Java generator 608 generates Java classes/files/interfaces,serializers, and the configuration data 612. The configuration data 612contains schema to Java mapping information and serializer information.The schema to Java mapping information at the configuration data 612includes customized mapping information and may also include defaultmapping information for generating schema to Java mapping. The schema toJava mapping information at the configuration data 612 is thenrepresented as the configuration object 610 for the schema to Javageneration. The configuration data 612 resides at an external file(e.g., types.xml file).

FIG. 6B illustrates an embodiment of configuration data 612. In oneembodiment, the configuration data 612 contains serializer information616 and schema to Java mapping information 614. The serializerinformation 616 and the mapping information 614 are used to correlatebetween existing XML schema and existing Java types and to correlatebetween XML types and pluggable parametric serializers in aserialization framework. The mapping information 614 includes customizedmapping information for customized schema to Java mapping. The mappinginformation 614 can also include default mapping information that isextracted from a default source, such as JAX-RPC, and then changed forcustomization and used to facilitate customized schema to Java mapping.Further, the mapping information 614 can be reused as input and outputfor the binding framework 600 both at runtime and generation time aspart of the configuration object 610. The configuration data 612 is usedas configuration object 610 to generate Java representation for XMLschema types to generate schema to Java mapping, and to generate Javatypes using mapping rules, and to export mapping rules without actualtype generation.

FIG. 6C illustrates an embodiment of a schema to Java configurationobject 610. The configuration object 610 contains configurationinformation, such as default and customized schema to Java mappinginformation. The configuration object 610 is a runtime object loadedinto the memory. A schema to Java mapping object or Schema Type Info Setobject (e.g., SchemaTypeInfoSet) 620 refers to an object, contained inthe configuration object 610, representing information loaded from theconfiguration data 612 residing at an external file 624, such as atypes.xml file. The configuration object 610 relates to theconfiguration data 612 in that the Schema Type Info Set object 620refers to an entity that can be loaded and saved into an XML file, suchas the types.xml file 624. The file 624 contain schema to Java mappinginformation 614 and serializer information 616. To start the schema toJava generator 608, the default configuration information can still beused, which can be set manually by the programmer. To achieve that, theconfiguration object 610 wraps the Schema Type Info Set object 620 andcontains additional configuration properties. For example, the defaultschema to Java mapping information is represented by the configurationobject 610, while the customized schema to Java mapping information (andsome default mapping information) is represented by the Schema Type InfoSet object 620 contained within the configuration object 610. SchemaType Info object (e.g., SchemaTypelnfo) 622 represents an interface ofAPI to allow access to the configuration information represented by theconfiguration, Schema Type Info Set and Schema Type Info objects610,620, 622.

FIG. 7 illustrates an architecture 700 for schema to Java generation. Inthe illustrated embodiment, schema files 704 and a configuration object706 are used to provide relevant configuration information to the schemato Java generator 702 for generating Java files 710, serializers 712,and configuration data 708. Schema files 704 include XSD files includinginformation relating to XML types and other relevant information. In oneembodiment, the configuration object 706 includes a runtime objectloaded into the memory. The configuration object 706 is an object (e.g.,SchemaTypelnfoSet) that represents information loaded from an XML file,such as the types.xml file. The types.xml file contains theconfiguration data 708. Further, the configuration object 706 representsan entity that can be loaded and saves into an external XML file,serving as a runtime representation of the external file. Theconfiguration object 706 may also contain a Schema Type Info objectserving as an interface to provide access to the configuration object706 and the Schema Type Info Set object.

In one embodiment, the schema to Java mapping information contained inthe configuration data 708 saved at the types.xml file can then beloaded as the configuration object 706. For example, the originaldefault mapping information can be amended at generation resulting incustomized mapping information at the configuration data 708 residing atthe types.xml file which can then be reloaded as the configurationobject 706. The configuration data 708 further includes serializerinformation (e.g., names of serializers) relating to configuredserializers 712 to facilitate initialization of serializers 712, andJava files, classes, and./or interfaces.

In one embodiment, the customized and configured information relating toschema to Java mapping is used to generate customized schema to Javamapping and initialization of the serialization framework after thegeneration process is completed. The mapping information may includedescription of relationships between the XML schema and Java classes orfiles 710. Such mapping information is further used to identify how andwhich Java files or classes 710 are to be generated and loaded. Further,the configuration data 708 can be modified and customized, asnecessitated or desired. For example, to change the nature of schema toJava mapping, information such as class names, field names, and thelike, can be amended to achieve the desired results. The configurationdata also includes Java class information (e.g., names of Java classes)relating to generated Java classes 710.

In one embodiment, the configuration data 708 includes a list ofserializers 712, description of relationships between serializers 712,and the necessary files that the runtime serializers can load. Aserializer 712 refers to a special class with special functionality toimplement special interfaces and to serialize specific Java objects intospecific a XML format. In other words, a serializer 712 provides aninterface to the parameters to an object which can be converted into XMLor vice versa. Furthermore, Java representation for XML schema types isgenerated, Java types using customized mapping rules are generated,mapping rules without type generation are exported, and in someinstances, Java types may also be generated using default mapping rules.

Further, using the contents (e.g., default and customized schema to Javamapping information) represented by the configuration object 706 and theconfiguration data 708. The schema to Java generator 702 can be used tointegrate multiple web services implementations into one bindingframework so that the reliance on a single default implementation is notnecessary. For example, the illustrated architecture 700 can have asingle binding framework that can be used for those schema to Javagenerations that are not just specifically fitted for the requirementsof a single or default implementation (e.g., JAX-RPC), but can also beused with various other web services implementations (e.g., JAX-RPC,Portals, XI, and WS runtime mapping) in the same XML binding framework.

Using the configuration object 706 and the configuration data 708, thefunctionality of the binding framework can be further extended inusability to include various other functions. Such other functionsinclude describing the mapping of XML schema to Java via schema to Javamapping information, initializing serialization runtime, and usingplugging extensions to serialization runtime by adding XML type-specificserializers and/or Java class-specific serializers that are invoked byserialization runtime.

FIG. 8 illustrates an embodiment of a schema to Java generationmechanism 800. The illustrated mechanism 800 includes and integratesvarious components and multiple web services implementations into asingle web services framework 802. This single web services framework802 is used for schema to Java generation that is fitted for andsatisfies the requirements of a default implementation (e.g., JAX-RPC),but that it is also fitted for and satisfies the requirements of otherimplementations (e.g., Portals, XI, and WS runtime mapping).

In one embodiment, the generation process is initiated at the webservices framework 802 with triggers the generation of schema to Javagenerator 810. In the illustrated embodiment, the schema to Javagenerator 810 generates serializers 812, interfaces 814, andconfiguration data 816. The configuration data 816 includesserialization information and schema to Java mapping information at anexternal XML file. In one embodiment, the configuration data 816 isgenerated by providing customized configuration object 804 to the schemato Java generator 810 or, in another embodiment, default mappinginformation is provided to the schema to Java generator 810, but it isthen amended at the schema to Java generator 810 to obtain particularcustomized configuration data 816.

In one embodiment, as illustrated, the content of the configuration data816 from the external file is then used as the Schema Type Info Setobject 806 which provides customized schema to Java mapping information.The Schema Type Info Set object 806 is wrapped with other necessaryand/or default mapping information as represented by the configurationobject 804. Further, a Schema Type Info object 808 is provided to allowaccess to the mapping information of the configuration object 804 andthe Schema Type Info Set object 806. The generation process is triggeredwith the loading of the schema mapping information of configurationobject 804 and the Schema Type Info Set object 806. The generation isthen invoked and results are obtained.

In one embodiment, configuration information for each schema type can bedescribed using the Schema Type Info object 808. This configurationinformation may include the description of which schema type to whatJava type is mapped and which serializer is responsible for this schematype and what the constructor parameters are going to be for thisserializer. The configuration information may further include propertiesthat customize the schema to Java field mappings. Also, schema mappingsof the Schema Type Info object 808 are combined in schema mapping setsin the Schema Type Info Set object 806. The Schema Type Info Set object806 can also include default schema mapping information, as necessitatedor desired.

For those types that do not have mapping information represented by theSchema Type Info Set object 806, the schema to Java generator 810 cangenerate serializers and Java classes and can add the mappinginformation to the Schema Type Info Set object 806. There may beseparation between the schema to Java mapping and schema to serailizermapping in the information represented by the Schema Type Info object808 and the Schema Type Info Set object 806. This is, for example, toreuse serializers in multiple use cases with minimum modifications.Also, for example, one serializer with different parameters can be usedfor different simple types.

FIG. 9 illustrates an embodiment of a schema to Java generationmechanism 900. In the illustrated embodiment various sets 912-916 ofmapping information as shown. For example, the default set 914represents the default schema to Java mapping. The stored set 912represents customized mapping information taken from a sources like theJSR 109 deployment descriptor (e.g., type-mapping.xml). The extended set916 represents an extended set that is used to support portals.

FIG. 10 illustrates an embodiment of a configuration structure 1000. Aschema to Java generator is illustrated 1002 as having the loadingcommand of “All”. In one embodiment, other commands like “Load”,“Container”, and “Framework” can also be used to obtain customizedresults. For example, Load helps obtain merely configuration data.Container provides configuration data and Java files/interfaces. Thecommand for Framework provides the configuration data and serializers,while the All command provides them all, i.e., configuration data,serializers, and Java files/interfaces.

As illustrated, configuration object 1004 is an object representingdefault mapping information that could include manual mappinginformation as set forth in the configuration object 1004 by theprogrammer or developer. Schema Type Info Set object 1006 and SchemaType Info object 1008 are also illustrated representing schema to Javamapping information (including default and/or customized mappinginformation) and interfaces necessary to allow access to suchinformation.

FIG. 11 illustrates a process for an embodiment of schema to Javageneration. Initiating a schema to Java generator via a web servicesframework at processing block 1102. The schema to Java generator may beinitiated with schema files and mapping information. The mappinginformation includes default mapping information. At processing block1104, the default mapping information is then amended to includecustomized schema to Java mapping information. At processing block 1106,a schema to Java configuration data is generated having customizedschema to Java mapping information and serializer information. A SchemaType Info Set object at a schema to Java configuration object isprepared using the customized mapping information extracted from theconfiguration data at an external XML file (e.g., types.xml) atprocessing block 1108. The Schema Type Info Set object at theconfiguration object represents customized schema to Java mappinginformation, but it also can contain default mapping information.Similarly, the configuration object includes default mappinginformation. Further, a Schema Type Info object is provided at theconfiguration object as an interface to provide access to the mappinginformation at the configuration and the Schema Type Info Set object.

At processing block 1110, the configuration object, including the SchemaType Info Set object, is loaded or reloaded with its default andcustomized mapping information. With the start of the mappinginformation and schema files loading, the generation process is invokedat processing block 1112. At processing block 1 114, the schema to Javagenerator generates results including schema to Java configuration data,serializers, and Java files, classes and/or interfaces. The results arethen queried and obtained in accordance with the command placed at theinitiation of the generation process at processing block 1116. Asdescribed elsewhere in this document, the command includes Load,Container, Framework, and/or All to help customize the results accordingto the user's needs or desires.

FIG. 12 illustrates an exemplary client/server system 1200 used inimplementing one or more embodiments of the invention. In theillustrated embodiment, a network 1208 links a server 1210 with variousclient systems A-N 1202-1206. The server 1210 is a programmable dataprocessing system suitable for implementing apparatus, programs, ormethods in accordance with the description. The server 1210 provides acore operating environment for one or more runtime systems that processuser requests. The server 1210 includes a processor 1212 and a memory1214. The memory 1214 can be used to store an operating system aTransmission Control Protocol/Internet Protocol (TCP/IP) stack forcommunicating over the network 1208, and machine-executable instructionsexecuted by the processor 1212. In some implementations, the server 1210can include multiple processors, each of which can be used to executemachine-executable instructions. The memory 1214 can include a sharedmemory area that is accessible by multiple operating system processesexecuting at the server 1210. An example of a suitable server to beimplemented using the client/server system 1200 may include J2EEcompatible servers, such as the Web Application Server developed by SAPAG of Walldorf, Germany, or the WebSphere Application Server developedby International Business Machines Corp. (IBM®) of Armonk, N.Y.

Client systems 1202-1206 are used to execute multiple applications orapplication interfaces. Each instance of an application or anapplication interface can constitute a user session. Each user sessioncan generate one or more requests to be processed by the server 1210.The requests may include instructions or code to be executed on aruntime system (e.g., the virtual machine (VM) 1216) on the server 1210.A VM 1216 is an abstract machine that can include an instruction set, aset of registers, a stack, a heap, and a method area, like a realmachine or processor. A VM 1216 essentially acts as an interface betweenprogram code and the actual processor or hardware platform on which theprogram code is to be executed. The program code includes instructionsfrom the VM instruction set that manipulates the resources of the VM1216.

FIG. 13 is an exemplary computer system 1300 used in implementing anembodiment of the present invention. In this illustration, a system 1300comprises a bus 1310 or other means for communicating data. The system1300 includes one or more processors, illustrated as shown as processor1 1315 through processor n 1320 to process information. The system 1300further comprises a random access memory (RAM) or other dynamic storageas a main memory 1325 to store information and instructions to beexecuted by the processor 1315 through 1320. The RAM or other mainmemory 1325 also may be used for storing temporary variables or otherintermediate information during execution of instructions by theprocessors 1315 through 1320.

A hard drive or other storage device 1330 may be used by the system 1300for storing information and instructions. The storage device 1330 mayinclude a magnetic disk or optical disc and its corresponding drive,flash memory or other nonvolatile memory, or other memory device. Suchelements may be combined together or may be separate components. Thesystem 1300 may include a read only memory (ROM) 1335 or other staticstorage device for storing static information and instructions for theprocessors 1315 through 1320.

A keyboard or other input device 1340 may be coupled to the bus 1310 forcommunicating information or command selections to the processors 1315through 1320. The input device 1340 may include a keyboard, a keypad, atouch-screen and stylus, a voice-activated system, or other inputdevice, or combinations of such devices. The computer may furtherinclude a mouse or other cursor control device 1345, which may be amouse, a trackball, or cursor direction keys to communicate directioninformation and command selections to the processors and to controlcursor movement on a display device. The system 1300 may include acomputer display device 1350, such as a cathode ray tube (CRT), liquidcrystal display (LCD), or other display technology, to displayinformation to a user. In some environments, the display device may be atouch-screen that is also utilized as at least a part of an inputdevice. In some environments, the computer display device 1350 may be ormay include an auditory device, such as a speaker for providing auditoryinformation.

A communication device 1350 may also be coupled to the bus 1310. Thecommunication device 1350 may include a modem, a transceiver, a wirelessmodem, or other interface device. The system 1300 may be linked to anetwork or to other device using via an interface 1355, which mayinclude links to the Internet, a local area network, or anotherenvironment. The system 1300 may comprise a server that connects tomultiple devices. In one embodiment the system 1300 comprises a Java®compatible server that is connected to user devices and to externalresources.

While the machine-readable medium 1330 is illustrated in an exemplaryembodiment to be a single medium, the term “machine-readable medium”should be taken to include a single medium or multiple media (e.g., acentralized or distributed database, and/or associated caches andservers) that store the one or more sets of instructions. The term“machine-readable medium” shall also be taken to include any medium thatis capable of storing, encoding or carrying a set of instructions forexecution by the machine of the system 1300 and that causes the machineto perform any one or more of the methodologies of the presentinvention. The term “machine-readable medium” shall accordingly be takento include, but not be limited to, solid-state memories, optical andmagnetic media, and carrier wave signals.

An article of manufacture may be used to store program code. An articleof manufacture that stores program code may be embodied as, but is notlimited to, one or more memories (e.g., one or more flash memories,random access memories (static, dynamic or other)), optical disks,CD-ROMs, DVD-ROMs, EPROMs, EEPROMs, magnetic or optical cards or othertype of machine-readable media suitable for storing electronicinstructions. Program code may also be downloaded from a remote computer(e.g., a server) to a requesting computer (e.g., a client) by way ofdata signals embodied in a propagation medium (e.g., via a communicationlink (e.g., a network connection)).

Furthermore, it is appreciated that a lesser or more equipped computersystem than the example described above may be desirable for certainimplementations. Therefore, the configuration of system 1300 may varyfrom implementation to implementation depending upon numerous factors,such as price constraints, performance requirements, technologicalimprovements, and/or other circumstances.

It is noted that processes taught by the discussion above can bepracticed within various software environments such as, for example,object-oriented and non-object-oriented programming environments, Javabased environments, such as a J2EE environment or environments definedby other releases of the Java standard), or other environments (e.g., a.NET environment, a Windows/NT environment each provided by MicrosoftCorporation).

It should be noted that, while the embodiments described herein may beperformed under the control of a programmed processor, such asprocessors 1315 through 1320, in alternative embodiments, theembodiments may be fully or partially implemented by any programmable orhardcoded logic, such as field programmable gate arrays (FPGAs), TTLlogic, or application specific integrated circuits (ASICs).Additionally, the embodiments of the present invention may be performedby any combination of programmed general-purpose computer componentsand/or custom hardware components. Therefore, nothing disclosed hereinshould be construed as limiting the various embodiments of the presentinvention to a particular embodiment wherein the recited embodiments maybe performed by a specific combination of hardware components.

It should be appreciated that reference throughout this specification to“one embodiment” or “an embodiment” means that a particular feature,structure or characteristic described in connection with the embodimentis included in at least one embodiment of the present invention.Therefore, it is emphasized and should be appreciated that two or morereferences to “an embodiment” or “one embodiment” or “an alternativeembodiment” in various portions of this specification are notnecessarily all referring to the same embodiment. Furthermore, theparticular features, structures or characteristics may be combined assuitable in one or more embodiments of the invention.

Similarly, it should be appreciated that in the foregoing description ofexemplary embodiments of the invention, various features of theinvention are sometimes grouped together in a single embodiment, figure,or description thereof for the purpose of streamlining the disclosureaiding in the understanding of one or more of the various inventiveaspects. This method of disclosure, however, is not to be interpreted asreflecting an intention that the claimed invention requires morefeatures than are expressly recited in each claim. Rather, as thefollowing claims reflect, inventive aspects lie in less than allfeatures of a single foregoing disclosed embodiment. Thus, the claimsfollowing the detailed description are hereby expressly incorporatedinto this detailed description, with each claim standing on its own as aseparate embodiment of this invention.

While certain exemplary embodiments have been described and shown in theaccompanying drawings, it is to be understood that such embodiments aremerely illustrative of and not restrictive, and that the embodiments ofthe present invention are not to be limited to specific constructionsand arrangements shown and described, since various other modificationsmay occur to those ordinarily skilled in the art upon studying thisdisclosure.

1. A method comprising: creating a second object having customizedschema to Java mapping information, the second object is placed within afirst object; and initiating schema to Java generation via the secondobject.
 2. The method of claim 1, further comprising creating the firstobject having default schema to Java mapping information, the firstobject including a configuration object.
 3. The method of claim 1,wherein the second object comprises a schema type info set object. 4.The method of claim 1, further comprising obtaining the customizedmapping information from a file, the file comprises an external filethat is an extensible markup language (XML)-based file.
 5. The method ofclaim 4, wherein the file comprises configuration data having one ormore of the customized mapping information and serializer information.6. The method of claim 1, wherein the first object further comprises athird object to provide access to the customized mapping information andthe default mapping information, the third object including a schematype info object.
 7. The method of claim 1, wherein the initiating ofschema to Java generation includes placing a command to request resultsfrom the initiation of the schema to Java generation.
 8. The method ofclaim 7, further comprising generating the requested results, theresults including one or more of configuration data, serializers,interfaces, classes, and files.
 9. The method of claim 1, wherein theschema to Java generation is performed by a generator residing at a Java2 Enterprise Edition (J2EE) engine, the generator including a schema toJava generator.
 10. The method of claim 9, further comprising providinga common framework for the schema to Java generation, the commonframework including a schema XML binding framework having web servicesframework that is compatible with one or more of Java ApplicationProgramming Interface-based XML Remote Procedure Call (JAX-RPC),Portals, XI, and web services runtime mapping requirements.
 11. Themethod of claim 1, further comprising generating direct mapping of XMLschema and Java interfaces.
 12. A system, comprising: a J2EE enginehaving a generator, the generator to identifying a first object having asecond object, the second object having customized schema to Javamapping information; and provide results based on the customized schemato Java mapping information when the generator is initialized.
 13. Thesystem of claim 12, wherein the generator is further to identify one ormore of default schema to Java mapping information and schema files, thegenerator including a schema to Java generator.
 14. The system of claim12, wherein the first object comprises one or more of default mappinginformation, the second object, and a third object, the third objecthaving a schema type info object to provide access to one or more of thedefault mapping information and the customized mapping information. 15.The system of claim 14, wherein the first object comprises a schema toJava configuration object, and the second object comprises a schema typeinfo set object.
 16. A machine-readable medium having stored thereondata representing sets of instructions which, when executed by amachine, cause the machine to: create a second object having customizedschema to Java mapping information, the second object is placed within afirst object; and initiate schema to Java generation via the secondobject.
 17. The machine-readable medium of claim 16, wherein theinstructions which, when executed by the machine, further cause themachine to create the first object having default schema to Java mappinginformation, the first object including a configuration object.
 18. Themachine-readable medium of claim 16, wherein the second object comprisesa schema type info set object.
 19. The machine-readable medium of claim16, wherein the instructions which, when executed by the machine,further cause the machine to obtain the customized mapping informationfrom a file, the file comprises an external file that is an extensiblemarkup language (XML)-based file.
 20. The machine-readable medium ofclaim 16, wherein the instructions which, when executed by the machine,further cause the machine to generate direct mapping of XML schema andJava interfaces.